/*************************************************************************
 * FILE:    inoutput.c
 * AUTHOR:  Karl Schmidbauer
 * VERSION: 1
 * DATE:    03/22/12
 * 
 * PURPOSE:
 *      C file for input/output functionallity.
 *      Initilizes and provides communication for reading and writing 
 *      to registers.
 ************************************************************************/
#include "inoutput.h"

/**
 * Reads in data from the IO port specified
 *
 * regAddress - register address to read data from
 */
uint8_t readIO(uint8_t regAddress){
	volatile unsigned char* port = (unsigned char*) regAddress;
	return *port;
}
/**
 * Writes specified data to the specified port
 *
 * regAddress - register address to write data to
 * data - data to write to the register
 */
void writeIO(uint8_t regAddress, uint8_t data){
	volatile unsigned char* port = (unsigned char*) regAddress;
	*port = data;
}
